//
//  FanKuiViewController.m
//  
//
//  Created by 赵天宇 on 16/9/17.
//
//

#import "FanKuiViewController.h"
#import "MessageViewController.h"
@interface FanKuiViewController ()<UITableViewDataSource,UITableViewDelegate>{
    UIButton *back;
    UIButton *net;
    UIImageView *imageTitle;
    UITableView *tableV;
    NSArray *arr;
    UILabel *question;
}

@end

@implementation FanKuiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"帮助与反馈";
    self.navigationController.navigationBar.barTintColor = [UIColor redColor];
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    UIBarButtonItem *rightB = [[UIBarButtonItem alloc]initWithTitle:@"我的反馈" style:UIBarButtonItemStylePlain target:self action:@selector(hello)];
    self.navigationItem.rightBarButtonItem=rightB;
    self.navigationController.navigationBar.barStyle=UIBarStyleBlack;

//    初始化back按钮
    back = [UIButton buttonWithType:0];
    back .frame=CGRectMake(50, 260, 300, 30);
    [back setTitle:@"意见反馈" forState:0];
    [back setTitleColor:[UIColor  blackColor] forState:0];
    [back addTarget:self action:@selector(goBack) forControlEvents:UIControlEventTouchUpInside];
    back.backgroundColor = [UIColor lightGrayColor];
    back.layer.masksToBounds=YES;
    back.layer.cornerRadius=10;
    [self.view addSubview:back];
//    初始化net按钮
    net = [UIButton buttonWithType:0];
    net.frame = CGRectMake(50, 295, 300, 30);
    [net setTitle:@"网络诊断" forState:0];
    net.layer.masksToBounds=YES;
    net.layer.cornerRadius=10;
    [net setTitleColor:[UIColor blackColor] forState:0];
    net.backgroundColor = [UIColor lightGrayColor];
    [self.view addSubview:net];
//    初始化imageTitle
    imageTitle = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 250)];
    imageTitle.image = [UIImage imageNamed:@"reader_coverdefault@2x.png"];
    [self.view addSubview:imageTitle];
//初始化question
    question = [[UILabel alloc]initWithFrame:CGRectMake(10, 330, 100, 20)];
    question.text=@"常见问题";
    question.textColor = [UIColor grayColor];
    [self.view addSubview:question];
//    初始化tablev
    tableV = [[UITableView alloc]initWithFrame:CGRectMake(0, 360, self.view.frame.size.width, self.view.frame.size.height) style:UITableViewStylePlain];
    tableV.delegate=self;
    tableV.dataSource=self;
    [self.view addSubview:tableV];
//    初始化arr
    arr=@[@"网络正常，但刷不出新闻怎么办？",@"夜间模式，离线阅读在哪里？",@"推广中推送了我近期浏览的商品？",@"阅读历史太多了，怎么清除？",@"离线后图片无法显示？",@"签到不成功怎么办？",@"本地新闻推送错误，怎么修改？",@"金币商城发货问题？",@"想读更多自己感兴趣的内容怎么办？",@"遇到打着新闻客户端名义的新闻敲诈怎么办？",@"为什么在设置中开启了推送仍然收不到？",@"跟贴不显示昵称怎么办？",@"为什么我设置了昵称，总会显示提交失败....",@"如何更新客户端版本？",@"轻松一刻栏目在哪里看？"];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return arr.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    NSString *ss=@"love";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ss];
    if(!cell){
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ss];
    }
    cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
    cell.textLabel.text=arr[indexPath.row];
    return cell;
}
-(void)hello{
    
}
-(void)goBack{
    MessageViewController *vv=[[MessageViewController alloc]init];
    [self.navigationController pushViewController:vv animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
